# 类属性  只此一份

class Chinese:
    national = '中国'

    # self.name 实例属性  对象属性
    def __init__(self, name):
        self.name = name


# 通过 类名.类属性  调用
print(Chinese.national)

p1 = Chinese('zhangsan')
print(p1.name)

print(p1.national)

p2 = Chinese('lisi')
print(p2.national)

# 动态的修改 或者 赋值 实例属性
p1.national = '美国'

print(p1.national)
print(p2.national)
print(Chinese.national)

Chinese.national = 'Hanguo'

print(Chinese.national)

print(p1.national)
print(p2.national)
